<template>
  <el-select :value="channel_id" placeholder="请选择" @change="$emit('change',$event)">
    <el-option label="请选择" value></el-option>
    <el-option :label="item.name" :value="item.id" v-for="(item,index) in channelAll" :key="index"></el-option>
  </el-select>
</template>

<script>
import { channelList } from "../../api/artical.js";
export default {
  props: ["channel_id"],
  model: {
    prop: "channel_id",
    event: "change"
  },
  data() {
    return {
      channelAll: []
    };
  },
  async created() {
    let res = await channelList();
    //   console.log(res);

    this.channelAll = res.data.data.channels;
  }
};
</script>

<style>
</style>